<f:subview
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  id="#{layout.id}">

  <c:if test="false">
    Handles grid layouts, using style classes defined by row properties.
  </c:if>
  <nxu:set var="layoutStyleClass"
    value="#{layout.properties.styleClass}"
    resolveTwice="true">

    <div class="gridContainer #{layoutStyleClass}">
      <nxl:layoutRow>
        <div class="gridRow #{layoutRow.properties['gridRowStyleClass']}">
          <nxl:layoutRowWidget>
            <c:set var="gridStyleClassProp" value="nxl_gridStyleClass_#{widgetIndex}" />
            <div class="gridBox #{nxu:test(empty layoutRow.properties[gridStyleClassProp], widgetControl_gridStyleClass, layoutRow.properties[gridStyleClassProp])}">
              <c:if test="#{widget != null}">
                <nxu:form id="#{widget.id}_form"
                  skip="#{!widgetControl_requireSurroundingForm}"
                  useAjaxForm="#{widgetControl_useAjaxForm}"
                  disableMultipartForm="#{widgetControl_disableMultipartForm}"
                  disableDoubleClickShield="#{widgetControl_disableDoubleClickShield}">
                  <nxl:widget widget="#{widget}" value="#{value}" />
                </nxu:form>
              </c:if>
            </div>
          </nxl:layoutRowWidget>
          <div class="clear" />
        </div>
      </nxl:layoutRow>
    </div>

  </nxu:set>

</f:subview>